package confs

type Secret struct {
	Appid     string `json:"appid"`
	AppSecret string `json:"appSecret"`
}

type SecretList []Secret

func NewSecretList() SecretList {

	return SecretList{
		// 中曼智联+  小程序
		Secret{
			Appid:     "wx817f81a10b1772b0",
			AppSecret: "21cd10e5f285b0868db2c0c5238e5633",
		},

		Secret{
			Appid:     "wx2e73f0573316f208",
			AppSecret: "e8ec75df1fd1b34ba18286874cfa4fa1",
		},

		// 中曼助手 小程序
		Secret{
			Appid:     "wxa2d02c6a1e8ffb24",
			AppSecret: "9cf987e94d3733e3bc46990993cff5e3",
		},
	}
}

func GetSecretByAppid(appid string) string {
	list := NewSecretList()
	for _, lst := range list {
		if appid == lst.Appid {
			return lst.AppSecret
		}
	}
	return ""
}
